Non-volatile memory is a type of memory that can retain its stored data without a power source. There are several types of non-volatile memories, with different read, write and erase capabilities, access times, data retention, data endurance cycles, etc. Electrically Erasable Programmable Read Only Memory (EEPROM) is capable of performing read write operations on a per-byte level, which means that each of the memory locations can be individually read and written.
Flash memory, comprised of flash-type floating-gate transistors, or cells, is a non-volatile memory similar in functionality and performance to EEPROM memory; flash memory has the advantage of being relatively inexpensive, although it operates under certain limitations. It is not possible to rewrite to a previously written location on flash memory without first erasing an entire memory section, i.e., the flash cells must be erased (e.g. programmed to “one”) before they can be programmed again. Flash memory can only erase relatively large groups of cells, usually called erase blocks (for example, 16 KB to 2 MB in size for many current commercial devices it is anticipated that the size of erase blocks will increase in the future, as devices with higher capacity become commercially available).
Error Correction In Flash Memory Devices
One salient feature of flash memory, and other memories (for example magnetic memory, optical storage and volatile memory) as well, is that these memories are corrupting medium one or more errors are sometimes introduced into original data that is written to the memory, so that when the data is read back from the memory, one or more information bits may be read from the memory in a “flipped” state.
In order to overcome this phenomenon and to make NAND-type memories usable by real applications, it is a common technique to use Error Correction Codes (ECC) in conjunction with these memories.
There is an ongoing need for improved techniques and apparatus for handling error correction in flash memory devices, and in storage devices that include solid state memory other than flash memory.
A Discussion of Device Architecture
FIG. 1A (prior art) is a block diagram of a flash memory storage device 260 (prior art). The flash memory storage device includes a flash memory 270 and a flash controller 280 operative to read data and to write data to the flash memory 270. The terms “program”, “programming”, “programmed”, and “programmable” are used herein interchangeably with the terms “write”, “writing”, “written”, and “writable”, respectively, to denote the storing of data in a flash memory.
One example of a flash memory storage device is a “peripheral flash storage device.” Peripheral flash storage devices are well-known in the art of computing, in form factors such as USB flash drives (UFD); PC-cards; and small storage cards used with digital cameras, music players, handheld and palmtop computers, and cellular telephones.
FIG. 1B (prior art) is a block diagram of a peripheral flash memory storage device 260* (the asterisk indicates that the flash memory storage device is a peripheral flash storage device) that is “coupled with” or configured to exchange data with a host device 310 (for example, a laptop or desktop or handheld computers, digital camera, mobile telephone, music player, and video game consoles) via device-side interface 250. Peripheral flash memory storage device 260* and host device 310 communicate with each other via communications link 300 using host-side interface 350 and device-side interface 250 (for example, respective USB or SD interfaces).
Although the peripheral flash memory storage device 260* is illustrated in the figure as a device that is separate from the host device 310, it is appreciated that, in some implementations, flash memory storage device 260* may be deployed within a housing of host device 310.
In one example, flash memory storage device 260* provides data-reading and data-writing services to host device 310. Data received by flash memory storage device 260* from host device 310 is written to flash memory 270 by flash controller 280. Furthermore, in response to “data read” requests received by flash memory storage, flash controller 280 reads data from flash memory 270.
Errors may be corrected in the read data at “read time” or at any later time. The error-correction may be carried out at least in part by flash controller 280, at least in part by host device 310 (for example, by execution of executable code 340 in RAM 330 by host-side processor 320 or in any other manner), and any other location and in any other manner.
The skilled artisan will appreciate that “peripheral flash storage devices” are not the only class of flash memory storage devices. For example, certain mobile phones, desktop or laptop computers, PDA devices or other electronic devices may also include flash memory and a flash controller, and may not necessarily be configured to couple with a host device and/or provide data reading services and/or data writing service for a host device.
The skilled artisan will appreciate that the flash memory devices described in FIGS. 1A-1B are just one class of peripheral non-volatile storage memory device, and other memory devices may include other types of solid-state memory, such as optical memory and magnetoresistive random-access memory (MRAM).